<h1>Listing pages</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Body</th>
  </tr>

<% for page in @pages %>
  <tr>
    <td><%=h page.title %></td>
    <td><%=h page.body %></td>
    <td><%= link_to 'Show', page %></td>
    <td><%= link_to 'Edit', edit_page_path(page) %></td>
    <td><%= link_to 'Destroy', page, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New page', new_page_path %>
